#pragma GCC optimize(2)
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <vector>
#include <cmath>

using namespace std;
using LL = long long;
/*
the square has largest area

*/

int main(){
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int n;
    cin >> n;

    int k = sqrt(n);
    
    if(k * k == n){
        cout << k * 2 << '\n';
    }else{
        cout << k * 2 + (n - k * k + k - 1) / k; 
    }




    return 0;
}